package com.bw.services.visit.model

import com.bw.services.visit.VisitApiService
import com.therouter.inject.Singleton
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import retrofit2.create

@Module
@InstallIn(SingletonComponent::class)
object VisitModule {
    @Provides
    @javax.inject.Singleton
    fun getVisitApiService(retrofit: Retrofit):VisitApiService =retrofit.create(VisitApiService::class.java)

    @Provides
    @javax.inject.Singleton
   fun getVisitRepo(apiService: VisitApiService):VisitRepo{
       return VisitRepo(apiService)
   }


}